The present invention relates to an image processing apparatus and method having the function of executing color transformation processing on image data depending on an I/O device or the like.
In general, an image I/O apparatus such as a color printer, a color display, a color scanner cannot directly use RGB signals or the like from an original image due to the variation of the physical characteristics of these apparatuses, so that color transformation must be performed before input or output depending on the characteristics of each apparatus.
Color transformation is also executed simply to make a user""s face look attractive, for example, to add a tinge of red to the flesh color so that the face appears beautiful. Actually, in most cases, color space transformation is further performed, for example, to transform RGB (Red, Green and Blue) into CMY (Cyan, Magenta, Yellow).
In general, simple linear transformation is insufficient to obtain high image quality by means of the above transformation, so that a combination of a color transformation table and a multi-dimensional equation is used. Color transformation methods are roughly divided into the following three types:
(a) transformation based on an equation,
(b) transformation based on transformation table look-up (LUT), and
(c) transformation based on a combination of transformation table look-up and equations.
The simplest example of the transformation based on an equation is a one-dimensional transformation equation as shown below:                               [                                                                      R                  xe2x80x2                                                                                                      G                  xe2x80x2                                                                                                      B                  xe2x80x2                                                              ]                =                              [                                                                                a                    ⁢                                          xe2x80x83                                        ⁢                    rr                                                                                        a                    ⁢                                          xe2x80x83                                        ⁢                    rg                                                                                        a                    ⁢                                          xe2x80x83                                        ⁢                    rb                                                                                                                    a                    ⁢                                          xe2x80x83                                        ⁢                    g                    ⁢                                          xe2x80x83                                        ⁢                    r                                                                                        a                    ⁢                                          xe2x80x83                                        ⁢                    gg                                                                                        a                    ⁢                                          xe2x80x83                                        ⁢                    gb                                                                                                                    a                    ⁢                                          xe2x80x83                                        ⁢                    br                                                                                        a                    ⁢                                          xe2x80x83                                        ⁢                    bg                                                                                        a                    ⁢                                          xe2x80x83                                        ⁢                    bb                                                                        ]                    ⁡                      [                                                            R                                                                              G                                                                              B                                                      ]                                              (        1        )            
That is, a one-dimensional equation for the value of each color (R, G, B) in an original pixel is multiplied by a transformation coefficient to obtain corrected pixel values (Rxe2x80x2, Gxe2x80x2, Bxe2x80x2).
Although the amount of calculations in Equation (1) is 9 in terms of the number of multiplications, these calculations must be applied to all (N) pixels, thereby requiring 9N multiplications in total.
To meet actual needs for color transformation that is sufficient for all points on a color space, high-order items must be introduced because the above one dimensional transformation provides an insufficient image quality, resulting in a significant increase in the amount of calculations required.
For example, even the simple introduction of a two-order item requires 27 multiplications per pixel.                               [                                                                      R                  xe2x80x2                                                                                                      G                  xe2x80x2                                                                                                      B                  xe2x80x2                                                              ]                =                              [                          3              xc3x97              9              ⁢                              xe2x80x83                            ⁢              matrix                        ]                    ⁡                      [                                                            R                                                                              G                                                                              B                                                                                                  R                    2                                                                                                                    G                    2                                                                                                                    B                    2                                                                                                RG                                                                              GB                                                                              BR                                                      ]                                              (        2        )            
In practice, this is often still insufficient, and the color transformation based only on an equation is thus rarely employed.
(b) Table Look-up Method
The table look-up method references a table in which color transformation is individually defined for all colors.
This method has the advantage of enabling every transformation, while having the disadvantage of requiring an enormous table size. For example, a 24-bit color space requires 224xc3x9724 bits, that is, 48 MBytes of table.
(c) Transformation Based on Transformation Table Look-up and Equations
This method provides a transformation table for representative colors sampled on a color space (for example, points that evenly divide each of R, G, and B into 16 pieces or the like) and calculates the other colors from several representative colors in the neighborhood using an equation.
This method requires a small table size and a small area to be interpolated by an equation, thereby enabling appropriate color transformation with a relatively simple equation.
This method is actually often employed and various methods have been proposed including a color space division method, a neighborhood point selection method, and an interpolation method. This method, however, also involves at least several multiplications/divisions for all pixels and thus does not eliminate the disadvantage of requiring a large amount of calculations. Accordingly, a faster method is desired.
Recently, a compression method such as the JPEG has been used, for example, to reduce the image data size. The JPEG (Joint Photographic Coding Expert Group) is a method for compressing multi-gradient images (including color images) which has been standardized by ISO (International Standards Organization) and ITU (International Telecommunication Union).
However, image compression and color transformation are treated as totally different techniques, and in practical applications, these techniques are sequentially used for processing as follows:
Output system: compressed imagexe2x86x92(expansion)xe2x86x92 original imagexe2x86x92(color transformation)xe2x86x92output image
Input system: input imagexe2x86x92(color transformation)xe2x86x92 original image (compression)xe2x86x92compressed image
For example, printers perform such sequential processing by (1) expanding a JPEG-compressed image and (2) executing color transformation to this image for output.
If image compression and expansion is performed separately from color transformation, the color transformation process requires a large amount of time because it is used for raw image data obtained before compression or after expansion and having a large number of pixels. Image I/O processing further includes an amount of time required for the compression and expression processes, thereby requiring a vast amount of time.
The present invention is provided in view of these circumstances, and it is an object of the present invention to provide an image processing apparatus and method that can reduce the number of color transformation target pixels without significantly degrading image quality and that can enable very fast processing.
In order to attain this object, according to a first aspect of the present invention, there is provided an image processing apparatus comprising reduced image production means for producing reduced image data from original image data; color transformation means for transforming color of the reduced image data obtained by the reduced image production means; first frequency transformation means for executing frequency transformation to the reduced image data subjected to color transformation by the color transformation means in order to determine low-frequency coefficient of the original image data; second frequency transformation means for executing frequency transformation to the original image data to determine high-frequency coefficient of the original image data; means for combining the low-frequency coefficient determined by the first frequency transformation means and the high-frequency coefficient determined the second frequency transformation means in order to generate frequency coefficient of the original image data; and coding means for coding the generated frequency coefficient of the original image.
The processing executed by this image processing apparatus is divided into a process for determining low-frequency coefficient and a process for determining high-frequency coefficient. The process for determining low-frequency coefficient comprises executing color transformation on a reduced image obtained by sub-sampling and having a smaller number of pixels and then subjecting the color-transformed image to frequency transformation (orthogonal transformation) based on the DCT (discrete cosine transformation) or Wavelet transformation so that frequency coefficient of the reduced image obtained by the frequency transformation are determined as the low-frequency coefficient. On the other hand, the process for determining high-frequency coefficient comprises directly executing transformation to original image data without executing the color transformation process so that frequency coefficient obtained by the frequency transformation are determined as the high-frequency coefficient of the original image. Then, by combining the low- and high-frequency coefficient together, frequency coefficient of the original image are determined which covers both the low and high frequencies. This combine process can be easily implemented, for example, by executing frequency transformation to original image data without color transformation to obtain 8xc3x978 DCT coefficients and replacing a frequency coefficient obtained from a reduced image for some of the DCT coefficients and which constitute the low-frequency component.
With this simultaneous compression and color transformation processing of separately subjecting the low- and high-frequency component sides to the frequency transformation process and executing color transformation only to the low-frequency components, which more significantly affect image quality, without executing color transformation on the high-frequency components, the number of color transformation target pixels can be reduced to increase the processing speed without seriously degrading image quality.
In addition, according to a second aspect of the present invention, there is provided an image processing apparatus comprising means for decoding compressed and coded image data to obtain frequency coefficient of the compressed and coded image data; first image data generation means for executing inverse frequency transformation to low-frequency coefficient of the obtained frequency coefficient of the compressed and coded image data to generate reduced image data; color transformation means for executing color transformation on the reduced image data obtained by the first image data generation means; image data size reproduce means for reproducing the reduced image data subjected to the color transformation by the color transformation means, to a size of the original image data; second image data generation means for executing inverse frequency transformation to the frequency coefficient of the compressed and coded image data other than the low-frequency coefficient to generate image data; and means for combining the image data obtained by the image size reproduce means with the image data obtained by the second image data generation means in order to generate a decoded image of the compressed and coded image data.
Thus, in expanding a compressed and coded image, the number of color transformation target pixels can also be reduced to increase the processing speed without degrading image quality, using the above simultaneous expansion and color transformation processing method of using the separate inverse frequency transformation processes for the low- and high-frequency component sides and executing color transformation only to the low-frequency components, which more significantly affect image quality, without executing color transformation on the high-frequency components.
The boundary for dividing the frequency coefficient of the image data into the low- and high-frequency sides may be fixedly determined beforehand. When, however, it is determined whether or not any of the high-frequency components has a higher level than a predetermined threshold and if so, then the function of dynamically changing the boundary depending on the spatial position of this frequency coefficient is desirably provided. This function can reduce the effects of color transformation errors originating from the lack of the color transformation of the high-frequency components, thereby providing higher-quality images.
In addition, in decoding image data coded by hierarchical mode, the processing speed can be increased without degrading image quality, using simple processing for executing color transformation to decoded image data obtained from low-resolution image data without the color transformation of decoded image data obtained from high-resolution image data.
Additional objects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objects and advantages of the invention may be realized and obtained by means of the instrumentalities and combinations particularly pointed out hereinafter.